package com.hehua.web.decorator.demo2;

public class OrderPriceCalculatorClient {
    public static void main(String[] args) {
        BasicPriceCalculator basicPriceCalculator = new BasicPriceCalculator();
        DiscountDecorator discountDecorator = new DiscountDecorator();
        TaxDecorator taxDecorator = new TaxDecorator();
        discountDecorator.setOrderPriceCalculator(basicPriceCalculator);
        taxDecorator.setOrderPriceCalculator(discountDecorator);
        double calculatePrice = taxDecorator.calculatePrice(10);
        System.out.println(calculatePrice);
    }
}
